home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / C&C++Tools / BVCW95.ZIP / DOC.ZIP / MATRIX.TXT < prev    next >
Encoding:
Text File  |  1998-02-04  |  46.4 KB  |  914 lines

  1.        OOOOOO                            VV        VV
  2.       OO    OO   PPPPPPP   TTTTTTTT  II   VV      VV  EEEEEE   CCCCCC
  3.       OO    OO   PP    PP     TT     II    VV    VV   EE       CC
  4.       OO    OO   PPPPPPP      TT     II     VV   VV   EEEEEE   CC
  5.       OO    OO   PP           TT     II       VVV     EE       CC
  6.        OOOOOO    PP           TT     II        V      EEEEEE   CCCCCC
  7.  
  8.  
  9.                        OptiVec  Version 1.4
  10.  
  11.               Part Three: Description of MatrixLib
  12.  
  13.                      Dr. Martin Sander Software Development
  14.                      Sertürnerstr. 11
  15.                      D-37085 Göttingen
  16.                      Germany
  17.                      e-mail: MartinSander@Bigfoot.com
  18.                      http://www.optivec.com
  19.  
  20. ****************************************************************************
  21.  
  22. !!     This is an ASCII text file!  It is best viewed with a simple        !!
  23. !!     DOS editor.                                                         !!
  24. !!     If you load this file into a word processor under Windows, you      !!
  25. !!     must use the filter "DOS text".                                     !!
  26. !!     Alternatively, you may use FCONVERT (shipped with Borland C++) to   !!
  27. !!     convert from ASCII (OEM) into the ANSI character set.               !!
  28. !!     Preferrably use the lettertype CourierNew 10 pt.                    !!
  29.  
  30. A general description of OptiVec is given in the  F i r s t  P a r t
  31. of this documentation, in the file HANDBOOK.TXT.
  32. Chapter 1.2 of that file contains the licence terms.
  33. See FUNCREF.TXT for the description of VectorLib functions,
  34. and CMATH.TXT for CMATH functions.
  35.  
  36. Copyright for the Software and its documentation (C) 1996-1999 Martin Sander
  37.  
  38.  
  39. ****************************************************************************
  40. *                                                                          *
  41. *******                           Contents                           *******
  42. *                                                                          *
  43. ****************************************************************************
  44.  
  45.  1. MatrixLib Introduction
  46.  2. Management of Dynamically Generated Matrices
  47.  3. Initialization of Matrices
  48.  4. Data-Type Conversions
  49.  5. Transposing and Extracting Parts from a Matrix
  50.  6. Arithmetic Operations Performed on a Single Row, Column, or the Diagonal
  51.  7. Operations performed along all rows or all columns simultaneously
  52.  8. Operations involving two rows or two colums
  53.  9. Matrix Multiplication
  54. 10. Linear Algebra 
  55. 11. Eigenvalues and Eigenvectors
  56. 12. Two-Dimensional Fourier-Transform Methods
  57. 13. Data Fitting
  58. 14. Matrix Input and Output
  59. 15. Graphical Representation of Matrices
  60. 16. Alphabetical Syntax Reference
  61.  
  62.  
  63. 1. MatrixLib Introduction
  64. -------------------------
  65.  
  66. MatrixLib defines the following data types:
  67.   fMatrix   matrix of floats
  68.   dMatrix   matrix of doubles
  69.   eMatrix   matrix of extended (long double)
  70.   cfMatrix  matrix of fComplex (complex<float>)
  71.   cdMatrix  matrix of dComplex (complex<double>)
  72.   ceMatrix  matrix of eComplex (complex<extended>)
  73.  
  74. The ordering of elements is the same as in the two-dimensional arrays
  75. provided by the respective target compilers. This means that the matrices
  76. are stored row-wise in MatrixLib versions for C and C++ compilers, but
  77. column-wise in versions for Pascal and Fortran.
  78. At present, integer matrices are defined, but no functions are available
  79. for them.
  80.  
  81. While we recommend to exclusively use these dynamically allocated matrix
  82. types, static matrices defined, e.g., as
  83.     float  MX[4][6];
  84. can be used in all MatrixLib functions with the exception of the multiLinfit
  85. and multiNonlinfit routines.
  86.  
  87. Each MatrixLib function has a prefix defining the data type on which it acts:
  88.  
  89. MF_  for arguments of the types fMatrix, float and fVector
  90. MD_  for arguments of the types dMatrix, double and dVector
  91. ME_  for arguments of the types eMatrix, extended (long double) and eVector
  92. MCF_ for arguments of the types cfMatrix, fComplex and cfVector
  93. MCD_ for arguments of the types cdMatrix, dComplex and cdVector
  94. MCE_ for arguments of the types ceMatrix, eComplex and ceVector
  95.  
  96.  
  97. 2. Management of Dynamically Generated Matrices
  98. -----------------------------------------------
  99.  
  100. MF_matrix      allocate memory for a matrix
  101. MF_matrix0     allocate memory and set all elements 0
  102. M_free         free one matrix (data-type independent)
  103. M_nfree        free n matrices (data-type independent)
  104. V_freeAll      free all existing vectors and matrices 
  105.  
  106. OptiVec's dynamically allocated matrices can be addressed just like two-
  107. dimensional static arrays of C. If you have, e.g., an fMatrix MX and
  108. a variable float a, you can write a line like
  109.      a = MX[3][5];
  110.  
  111. Additionally, there are two functions addressing single elements
  112. (which are necessary for Pascal and for getting around the
  113. pointer arithmetics bug in some versions of Borland C++):
  114.  
  115. MF_Pelement    Pointer to a specific matrix element
  116. MF_element     value of a specific matrix element
  117.  
  118.  
  119. 3. Initialization of Matrices
  120. -----------------------------
  121.  
  122. MF_equ0        set all elements to 0
  123. MF_equ1        identity matrix: set all diagonal elements to 1.0,
  124.                all others to 0
  125. MF_outerprod   matrix formed by the "outer product" of two vectors
  126.  
  127. MF_Row_equC    set all elements of one specific row to the constant C
  128. MF_Col_equC    set all elements of one specific column to the constant C
  129. MF_Dia_equC    set all diagonal elements to the constant C
  130. MF_Row_equV    copy a vector into one specific row
  131. MF_Col_equV    copy a vector into one specific column
  132. MF_Dia_equV    copy a vector into the diagonal
  133.  
  134. MF_equM        make one matrix the copy of another
  135. MF_UequL       copy lower-diagonal elements into upper-diagonal
  136.                by index-reflection, so as to get a symmetric matrix 
  137. MF_LequU       copy upper-diagonal elements into lower-diagonal
  138.  
  139. Two-dimensional windows for spectral analysis are provided by:
  140. MF_Hanning     Hanning window
  141. MF_Parzen      Parzen window
  142. MF_Welch       Welch window
  143.  
  144.  
  145. 4. Data-Type Conversions
  146. ------------------------
  147.  
  148. Matrices of every data type can be converted into every other.
  149. Only a few examples are given; the rest should be obvious.
  150.  
  151. M_FtoD    fMatrix to dMatrix
  152. M_CDtoCF  cdMatrix to cfMatrix (with overflow protection)
  153. M_DtoE    dMatrix to eMatrix
  154.  
  155.  
  156. 5. Transposing and Extracting Parts from a Matrix
  157. -------------------------------------------------
  158.  
  159. MF_transpose        transpose a matrix
  160.  
  161. MF_submatrix        extract a submatrix
  162. MF_submatrix_equM   copy a submatrix back into another (normally larger)
  163.                     matrix
  164.  
  165. MF_Row_extract      extract a single row and copy it into a vector
  166. MF_Col_extract      extract a single column and copy it into a vector
  167. MF_Dia_extract      extract the diagonal and copy it into a vector
  168.  
  169. 6. Arithmetic Operations Performed on a Single Row, Column, or the Diagonal
  170. ---------------------------------------------------------------------------
  171.  
  172. MF_Row_addC         add a constant to all elements of a specific row
  173. MF_Col_addC         add a constant to all elements of a specific column
  174. MF_Dia_addC         add a constant to all diagonal elements
  175. MF_Row_addV         add corresponding vector elements to all elements of a
  176.                     specific row
  177. MF_Col_addV         add corresponding vector elements to all elements of a
  178.                     specific column
  179. MF_Dia_addV         add corresponding vector elements to the diagonal elements
  180.  
  181. A few examples should suffice for the other functions of this family:
  182. MF_Row_subC         subtract a constant from all elements of a specific row
  183. MF_Col_subrC        reverse substraction: difference between column elements
  184.                     and a constant
  185. MF_Dia_mulV         multiply the diagonal elements with corresponding vector
  186.                     elements
  187. MF_Row_divV         divide all elements of a specific row by corresponding
  188.                     vector elements
  189. MF_Col_divrC        reverse division: division of a constant by the individual
  190.                     column elements
  191.  
  192.  
  193. 7. Operations performed along all rows or all columns simultaneously,
  194.          or along the diagonal of a square matrix
  195. ----------------------------------------------------------------------
  196.  
  197. MF_Rows_max         store the maxima of all rows in a column vector
  198. MF_Cols_max         store the maxima of all colums in a row vector
  199. MF_Dia_max          return the maximum of the diagonal as a scalar
  200.  
  201. MF_Rows_min         store the minima of all rows in a column vector
  202. MF_Cols_min         store the minima of all colums in a row vector
  203. MF_Dia_min          return the minimum of the diagonal as a scalar
  204.  
  205. MF_Rows_absmax      store the absolute maxima of all rows in a column vector
  206. MF_Cols_absmax      store the absolute maxima of all colums in a row vector
  207. MF_Dia_absmax       return the absolute maximum of the diagonal as a scalar
  208. MF_Rows_absmin      store the absolute minima of all rows in a column vector
  209. MF_Cols_absmin      store the absolute minima of all colums in a row vector
  210. MF_Dia_absmin       return the absolute minimum of the diagonal as a scalar
  211.  
  212. MF_Rows_sum         sum, taken along rows and stored in a column vector
  213. MF_Cols_sum         sum, taken along colums and stored in a row vector
  214. MF_Dia_sum          sum of the diagonal elements
  215.  
  216. MF_Rows_prod        product, taken along rows and stored in a column vector
  217. MF_Cols_prod        product, taken along colums and stored in a row vector
  218. MF_Dia_prod         product of the diagonal elements
  219.  
  220. MF_Rows_runsum      running sum along rows
  221. MF_Cols_runsum      running sum along columns
  222. MF_Rows_runprod     running product along rows
  223. MF_Cols_runprod     running product along columns
  224.  
  225. MF_Rows_rotate      rotate all rows by a specified number of positions
  226. MF_Cols_rotate      rotate all rows by a specified number of positions
  227. MF_Rows_reflect     set the upper halves of all rows equal to their reversed
  228.                     lower halves
  229. MF_Cols_reflect     set the upper halves of all columns equal to their
  230.                     reversed lower halves
  231.  
  232.  
  233. 8. Operations involving two rows or two colums
  234. ----------------------------------------------
  235.  
  236. MF_Rows_exchange   exchange two rows
  237. MF_Cols_exchange   exchange two columns
  238.  
  239. MF_Rows_add        add two rows  (destination += source)
  240. MF_Cols_add        add two columns 
  241.  
  242. MF_Rows_sub        subtract two rows (destination -= source)
  243. MF_Cols_sub        subtract two columns
  244.  
  245. MF_Rows_Cadd       add scaled row to another (destination += C * source)
  246. MF_Cols_Cadd       add scaled column to another
  247.  
  248. MF_Rows_lincomb    linear combination of two rows
  249. MF_Cols_lincomb    linear combination of two columns
  250.  
  251.  
  252. 9. Matrix Multiplication
  253. ------------------------
  254.  
  255. MF_mulV            multiply a matrix by a column vector
  256. VF_mulM            multiply a row vector by a matrix
  257. MF_mulM            multiply two matrices
  258.  
  259. 10. Linear Algebra
  260. ------------------
  261.  
  262. First the "easy-to-use" versions of linear algebra functions:
  263. MF_solve          solve simultaneous linear equations, using LU decomposition
  264. MF_inv            invert a matrix
  265. MF_det            determinant of a matrix
  266. MF_solveBySVD     solve simultaneous linear equations, using Singular Value
  267.                   Decomposition
  268. MF_safeSolve      try first solution by LUD; if that fails, SVD is done.
  269.  
  270. Now some functions for LU decomposition and for treatment of
  271. LU decomposed matrices:
  272.  
  273. MF_LUdecompose    decompose into LU form
  274. MF_LUimprove      improve accuracy of LU decomposition by iteration
  275. MF_LUDresult      check if MF_LUdecompose was successful
  276. MF_LUDsetEdit     set editing threshold for MF_LUdecompose; may be used to
  277.                   work around singularities
  278. MF_LUDgetEdit     retrieve currently set threshold
  279.  
  280. MF_LUsolve        solve simultaneous linear equations, given the matrix in
  281.                   LU form
  282. MF_LUinv          invert matrix already composed into LU form
  283. MF_LUdet          determinant of matrix already composed into LU form
  284.  
  285. Singular Value Decomposition and related functions:
  286.  
  287. MF_SVdecompose    Singular Value Decomposition
  288. MF_SVsolve        solve SV-decomposed set of linear equations
  289. MF_SVimprove      iterative improvement of solution found by MF_SVsolve
  290. MF_SVDsetEdit     set threshold for Singular Value editing
  291. MF_SVDgetEdit     retrieve current threshold for Singular Value editing
  292.  
  293.  
  294. 11. Eigenvalues and Eigenvectors
  295. --------------------------------
  296.  
  297. MFsym_eigenvalues  eigenvalues with or without eigenvectors of a symmetric
  298.                    real matrix (only this special, but most frequent case
  299.                    is currently covered)
  300.  
  301. 12. Two-Dimensional Fourier-Transform Methods
  302. ---------------------------------------------
  303.  
  304. MF_FFT            Fast Fourier Transform
  305. MF_convolve       Convolution with a spacial response function
  306. MF_deconvolve     Deconvolution
  307. MF_filter         Spatial filtering
  308. MF_autocorr       Spatial autocorrelation
  309. MF_xcorr          Spatial cross-correlation
  310. MF_spectrum       Spatial frequency spectrum
  311.  
  312.  
  313. 13. Data Fitting
  314. ----------------
  315.  
  316. The functions for fitting X-Y pairs of data are included in MatrixLib
  317. rather than in VectorLib, because they heavily rely on matrix methods.
  318. Their prefix, VF_, however, is a reminder that they actually work on
  319. vectors, rather than on matrices. (The weighted variants actually do
  320. also work on a matrix and calculate the covariance matrix of parameters).
  321. The simplest form of data fitting, namely linear regression, does not
  322. employ matrix methods and is described in the VectorLib documentation:
  323. VF_linregress.
  324.  
  325. VF_polyfit        fit an X-Y data pair to a polynomial of arbitrary degree
  326. VF_polyfitwW      the same with non-equal weighting of individual data points
  327. VF_linfit         fit an X-Y data pair to a function linear in its parameters
  328. VF_linfitwW       the same with non-equal weighting of individual data points
  329. VF_nonlinfit      fit X-Y data to an arbitrary, possibly non-linear function
  330. VF_nonlinfitwW    the same for non-equal data-point weighting
  331. VF_multiLinfit       fit multiple X-Y data sets to one common model,
  332.                      linear in its parameters
  333. VF_multiLinfitwW     the same for non-equal data-point weighting
  334. VF_multiNonlinfit    fit multiple X-Y data sets to one common model,
  335.                      possibly nonlinear in its parameters
  336. VF_multiNonlinfitwW  the same for non-equal data-point weighting
  337.  
  338. With the exception of fitting to polynoms, which are present only for the
  339. X-Y data case, here are the corresponding functions for fitting
  340. z = f(x,y) data (with the prefix MF_):
  341.  
  342. MF_linfit         fit X-Y-Z data to a function linear in its parameters
  343. MF_linfitwW       the same with non-equal weighting of individual data points
  344.  
  345. MF_nonlinfit      fit X-Y-Z data to an arbitrary, possibly non-linear function
  346. MF_nonlinfitwW    the same for non-equal data-point weighting
  347.  
  348. MF_multiLinfit       fit multiple X-Y-Z data sets to one common model,
  349.                      linear in its parameters
  350. MF_multiLinfitwW     the same for non-equal data-point weighting
  351. MF_multiNonlinfit    fit multiple X-Y-Z data sets to one common model,
  352.                      possibly nonlinear in its parameters
  353. MF_multiNonlinfitwW  the same for non-equal data-point weighting
  354.  
  355. The nonlinear fitting routines are highly sophisticated and offer the user
  356. a lot of different options. These options may be set by the function
  357. V_setNonlinfitOptions. To retrieve current settings, use
  358. V_getNonlinfitOptions.
  359.  
  360. All options are packed into a structure named VF_NONLINFITOPTIONS.
  361. VF_NONLINFITOPTIONS has the following fields:
  362.  
  363. int      FigureOfMerit       0: least squares fitting
  364.                              1: robust fitting, optimizing for minimum
  365.                                 absolute deviation
  366.                              Default: 0
  367.  
  368. float    AbsTolChi           absolute change of chi (default: EPSILON)
  369. float    FracTolChi          fractional change of chi
  370.                                     (default: SQRT_EPSILON)
  371. float    AbsTolPar           absolute change of all parameters
  372.                                     (default: SQRT_MIN) 
  373. float    FracTolPar          fractional change of all parameters
  374.                                     (default: SQRT_EPSILON)
  375.                              These four parameters describe the convergence
  376.                              conditions: if the changes achieved in successive
  377.                              iterations are smaller than demanded by these
  378.                              criteria, this signals convergence. Set those
  379.                              criteria to 0.0, which are not applicable
  380.  
  381. unsigned HowOftenFulfill     how often fulfill one of the above conditions
  382.                              before convergence is considered achieved
  383.                              (default: 3)
  384.  
  385. unsigned LevelOfMethod       1: Levenberg-Marquardt method,
  386.                              2: Downhill Simplex (Nelder and Mead) method,
  387.                              3: both methods alternating;
  388.                                 add 4 to this in order to try
  389.                                 breaking out of local minima;
  390.                              0: no fit, calculate only chi2 (and Covar)
  391.                              (default: 1)
  392.  
  393. unsigned LevMarIterations    max.number of successful iterations of LevMar
  394.                              during one run (default: 100)
  395.  
  396. unsigned LevMarStarts        number of LevMar restarts per run (default: 2)
  397.  
  398. float    LambdaStart,
  399.          LambdaMin,
  400.          LambdaMax,
  401.          LambdaDiv,
  402.          LambdaMul           treatment of LevMar parameter lambda (don't
  403.                              touch, unless you are an expert!)
  404.  
  405. unsigned DownhillIterations  max. number of successful iterations in Downhill
  406.                              Simplex method  (default: 200)
  407.  
  408. float    DownhillReflection,
  409.          DownhillContraction,
  410.          DownhillExpansion   treatment of re-shaping of the simplex in
  411.                              Downhill Simplex method  (don't touch
  412.                              unless you are an expert!)
  413.  
  414. unsigned TotalStarts;        max. number of LevMar/Downhill pairs
  415.                              (default: 16)
  416.  
  417. fVector  UpperLimits;        impose upper limits on parameters. Default: NULL
  418. fVector  LowerLimits         impose lower limits on parameters. Default: NULL
  419.  
  420. void     (*Restrictions)(void);  user-defined function, implementing
  421.                              restrictions on the parameters which are not
  422.                              contained in the upper/lower limits restriction.
  423.                              The function must check the whole parameter
  424.                              vector and edit the parameters as needed.
  425.                              Default: NULL 
  426.  
  427.  
  428. The multifit functions, i.e. those which allow the treatment of several
  429. X-Y or X-Y-Z data sets simultaneously, need the data to be passed in
  430. structures named VF_EXPERIMENT for X-Y data and MF_EXPERIMENT for X-Y-Z
  431. data:
  432.  
  433. VF_EXPERIMENT has the following fields:
  434.  
  435. fVector X, Y               X and Y vectors
  436. fVector InvVar             inverse variances of the individual vector
  437.                            elements (needed only for the "with weights"
  438.                            functions)
  439. ui      size               the number of vector elements 
  440. float   WeightOfExperiment individual weight to be assigned to the
  441.                            whole experiment (again needed only for
  442.                            the weighted variants)
  443.  
  444. MF_EXPERIMENT has the following fields:
  445.  
  446. fVector   X, Y             X and Y vectors (independent variables)
  447. fMatrix   MZ               measured data z=f(x,y)
  448. fMatrix   MInvVar          inverse variances of the individual matrix
  449.                            elements (needed only for the "with weights"
  450.                            functions)
  451. unsigned  htZ, lenZ        matrix dimensions
  452. float     WeightOfExperiment weight to be assigned to the whole
  453.                            experiment (again needed only for
  454.                            the weighted variants)
  455.  
  456.  
  457. 14. Matrix Input and Output
  458. ---------------------------
  459.  
  460. The matrix input/output functions are all analogous to the corresponding
  461. vector functions
  462.  
  463. MF_cprint   print a matrix to the screen. If necessary, rows are cut off
  464.             at the screen boundaries. If there are more rows than screen
  465.             lines, proper paging is applied.
  466. MF_print    print a matrix to the screen (without paging or row cut-off)
  467. MF_fprint   print a matrix in ASCII format to a stream. 
  468.  
  469. MF_store    store in binary format
  470. MF_recall   retrieve in binary format
  471. MF_write    write in ASCII format in a stream
  472. MF_read     read from an ASCII file.
  473.  
  474.  
  475. 15. Graphical Representation of Matrices
  476. ----------------------------------------
  477.  
  478. True 3D-plotting functions will be included only in future versions.
  479. For now, only color-density plots are available. In these plots, each
  480. data value is translated into a color value by linear interpolatiion
  481. between two colors, specified as mincolor and maxcolor.
  482.  
  483. MF_xyzAutoDensityMap    Color density map for z=f(x,y) with automatic
  484.                         scaling of the X and Y axes and of the color
  485.                         density scale between mincolor and maxcolor.
  486. MF_xyzDataDensityMap    z=f(x,y) color density map, plotted into an
  487.                         existing axis frame, and using the color density
  488.                         scale set by the last call to an "AutoDensityMap"
  489.                         function.
  490. MF_zAutoDensityMap      Color density map for z=f(i,j) with automatic
  491.                         scaling of the X and Y axes and of the color
  492.                         density scale between mincolor and maxcolor.
  493.                         i and j are the indices in X and Y direction,
  494.                         respectively.
  495. MF_zDataDensityMap      Color density map for z=f(i,j), plotted into
  496.                         an existing axis frame, and using the color
  497.                         density scale set by the last call to an
  498.                         "AutoDensityMap" function.
  499.  
  500.  
  501. 16. Alphabetical Syntax Reference
  502. ---------------------------------
  503.  
  504. This chapter summarizes, in alphabetical order, the syntax of MatrixLib
  505. functions. As usual, the MF_ or M_ prefix is neglected in the ordering
  506. of entries. The particles "Row_", "Rows_", "Col_", "Cols_", and "Dia_",
  507. however, are fully counted. For example, MF_Rows_ functions will come
  508. after all MF_Row_ functions. While most MatrixLib functions have the
  509. prefixes MF_ or M_, please note that some functions have the prefix VF_.
  510. These functions have been included into MatrixLib, because they use
  511. matrix methods. Their prefix is a reminder, however, that their functional
  512. behaviour is aimed at vectors more than on matrices, as in VF_linfit and
  513. other fitting functions. 
  514.  
  515. void    MF_autocorr( fPMatrix MACorr, fPMatrix MX,
  516.                      unsigned ht, unsigned len );
  517. void    M_CDtoCE( ceMatrix MF, cdMatrix MD, unsigned ht, unsigned len );
  518. void    M_CDtoCF( cfMatrix MF, cdMatrix MD, unsigned ht, unsigned len );
  519. void    M_CEtoCD( cdMatrix MF, ceMatrix MD, unsigned ht, unsigned len );
  520. void    M_CEtoCF( cfMatrix MF, ceMatrix MD, unsigned ht, unsigned len );
  521. void    M_CFtoCD( cdMatrix MF, cfMatrix MD, unsigned ht, unsigned len );
  522. void    M_CFtoCE( ceMatrix MF, cfMatrix MD, unsigned ht, unsigned len );
  523. void    MF_Col_addC( fMatrix MA, unsigned ht, unsigned len,
  524.                          unsigned iCol, float C );
  525. void    MF_Col_addV( fMatrix MA, unsigned ht, unsigned len,
  526.                          unsigned iCol, fVector X );
  527. void    MF_Col_divC( fMatrix MA, unsigned ht, unsigned len,
  528.                          unsigned iCol, float C );
  529. void    MF_Col_divrC( fMatrix MA, unsigned ht, unsigned len,
  530.                          unsigned iCol, float C );
  531. void    MF_Col_divrV( fMatrix MA, unsigned ht, unsigned len,
  532.                          unsigned iCol, fVector X );
  533. void    MF_Col_divV( fMatrix MA, unsigned ht, unsigned len,
  534.                          unsigned iCol, fVector X );
  535. void    MF_Col_equC( fMatrix MA, unsigned ht, unsigned len,
  536.                      unsigned iCol, float C );
  537. void    MF_Col_equV( fMatrix MA, unsigned ht, unsigned len,
  538.                      unsigned iCol, fVector X );
  539. void    MF_Col_extract( fVector Y, fMatrix MA, unsigned ht, unsigned len,
  540.                         unsigned iCol );
  541. void    MF_Col_mulC( fMatrix MA, unsigned ht, unsigned len,
  542.                          unsigned iCol, float C );
  543. void    MF_Col_mulV( fMatrix MA, unsigned ht, unsigned len,
  544.                          unsigned iCol, fVector X );
  545. void    MF_Col_subC( fMatrix MA, unsigned ht, unsigned len,
  546.                          unsigned iCol, float C );
  547. void    MF_Col_subrC( fMatrix MA, unsigned ht, unsigned len,
  548.                          unsigned iCol, float C );
  549. void    MF_Col_subV( fMatrix MA, unsigned ht, unsigned len,
  550.                          unsigned iCol, fVector X );
  551. void    MF_Col_subrV( fMatrix MA, unsigned ht, unsigned len,
  552.                          unsigned iCol, fVector X );
  553. void    MF_Cols_absmax( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  554. void    MF_Cols_absmin( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  555. void    MF_Cols_add( fPMatrix MA, unsigned ht, unsigned len,
  556.                      unsigned destCol, unsigned sourceCol );
  557. void    MF_Cols_Cadd( fPMatrix MA, unsigned ht, unsigned len,
  558.                       unsigned destCol, unsigned sourceCol, float C );
  559. void    MF_Cols_exchange( fPMatrix MA, unsigned ht, unsigned len,
  560.                           unsigned i1, unsigned i2 );
  561. void    MF_Cols_lincomb( fPMatrix MA, unsigned ht, unsigned len,
  562.                          unsigned destCol,  float  destC,
  563.                          unsigned srceCol,  float  srceC );
  564. void    MF_Cols_max( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  565. void    MF_Cols_min( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  566. void    MF_Cols_prod(fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  567. void    MF_Cols_reflect( fPMatrix MA, unsigned ht, unsigned len );
  568. void    MF_Cols_rotate( fPMatrix MA, unsigned ht, unsigned len, int pos );
  569. void    MF_Cols_runprod( fPMatrix MA, unsigned ht, unsigned len );
  570. void    MF_Cols_runsum( fPMatrix MA, unsigned ht, unsigned len );
  571. void    MF_Cols_sub( fPMatrix MA, unsigned ht, unsigned len,
  572.                      unsigned destCol, unsigned sourceCol );
  573. void    MF_Cols_sum( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  574. void    MF_convolve( fPMatrix MY, fPMatrix MFlt, fPMatrix MX,
  575.                      fPMatrix MRsp, unsigned ht, unsigned len );
  576. void    MF_cprint( fPMatrix MA, unsigned ht, unsigned len );
  577. void    MF_deconvolve( fPMatrix MY, fPMatrix MFlt, fPMatrix MX,
  578.                        fPMatrix MRsp, unsigned ht, unsigned len );
  579. float   MF_det( fPMatrix MA, unsigned len );
  580. float   MF_Dia_absmax(  fPMatrix MA, unsigned len );
  581. float   MF_Dia_absmin(  fPMatrix MA, unsigned len );
  582. void    MF_Dia_addC( fMatrix MA, unsigned len, float C );
  583. void    MF_Dia_addV( fMatrix MA, unsigned len, fVector X );
  584. void    MF_Dia_divC( fMatrix MA, unsigned len, float C );
  585. void    MF_Dia_divrC( fMatrix MA, unsigned len, float C );
  586. void    MF_Dia_divrV( fMatrix MA, unsigned len, fVector X );
  587. void    MF_Dia_divV( fMatrix MA, unsigned len, fVector X );
  588. void    MF_Dia_equC( fMatrix MA, unsigned len, float C );
  589. void    MF_Dia_equV( fMatrix MA, unsigned len, fVector X );
  590. void    MF_Dia_extract( fVector Y, fMatrix MA, unsigned len );
  591. float   MF_Dia_max(  fPMatrix MA, unsigned len );
  592. float   MF_Dia_min(  fPMatrix MA, unsigned len );
  593. void    MF_Dia_mulC( fMatrix MA, unsigned len, float C );
  594. void    MF_Dia_mulV( fMatrix MA, unsigned len, fVector X );
  595. float   MF_Dia_prod( fPMatrix MA, unsigned len );
  596. void    MF_Dia_subrC( fMatrix MA, unsigned len, float C );
  597. void    MF_Dia_subrV( fMatrix MA, unsigned len, fVector X );
  598. void    MF_Dia_subC( fMatrix MA, unsigned len, float C );
  599. void    MF_Dia_subV( fMatrix MA, unsigned len, fVector X );
  600. float   MF_Dia_sum(  fPMatrix MA, unsigned len );
  601. void    M_DtoE( eMatrix MF, dMatrix MD, unsigned ht, unsigned len );
  602. void    M_DtoF( fMatrix MF, dMatrix MD, unsigned ht, unsigned len );
  603.  
  604. float   MF_element( fMatrix X, unsigned ht, unsigned len,
  605.                     unsigned m, unsigned n );
  606. void    MFsym_eigenvalues( fVector EigV, fPMatrix EigM, fPMatrix MA,
  607.                            unsigned len, int CalcEigenVec );
  608. void    MF_equ0( fMatrix MA, unsigned ht, unsigned len );
  609. void    MF_equ1( fMatrix MA, unsigned len );  /* identity matrix */
  610. void    MF_equM( fMatrix MB, fMatrix MA, unsigned ht, unsigned len );
  611. void    M_EtoD( dMatrix MF, eMatrix MD, unsigned ht, unsigned len );
  612. void    M_EtoF( fMatrix MF, eMatrix MD, unsigned ht, unsigned len );
  613. void    MF_filter( fPMatrix MY, fPMatrix MX, fPMatrix MFlt,
  614.                    unsigned ht, unsigned len );
  615. void    MF_FFT( fPMatrix MY, fPMatrix MX,
  616.                  unsigned ht, unsigned len, int dir );
  617. void    M_findDensityMapBounds( extended xmin, extended xmax,
  618.                                 extended ymin, extended ymax,
  619.                                 extended zmin, extended zmax,
  620.                                 COLORREF mincolor, COLORREF maxcolor );
  621. void    MF_fprint( FILE  *stream, fPMatrix MA, unsigned ht,
  622.                      unsigned len, unsigned linewidth );
  623. void    M_free( void **M );
  624. void    M_FtoD( dMatrix MF, fMatrix MD, unsigned ht, unsigned len );
  625. void    M_FtoE( eMatrix MF, fMatrix MD, unsigned ht, unsigned len );
  626. float   VF_getLinfitNeglect( void );
  627. void    VF_getNonlinfitOptions( VF_NONLINFITOPTIONS *Options );
  628. void    MF_Hanning( fMatrix MA, unsigned ht, unsigned len );
  629. int     MF_inv( fPMatrix MInv, fPMatrix MA, unsigned len );
  630. void    MF_LequU( fMatrix MA, unsigned len );
  631. void    VF_linfit( fVector A, iVector AStatus, unsigned npars,
  632.                    fVector X, fVector Y, ui sizex,
  633.                    void (*funcs)(fVector BasFuncs, float x, unsigned nfuncs));
  634. void    VF_linfitwW( fVector A, fPMatrix Covar, iVector AStatus,
  635.                  unsigned npars,
  636.                  fVector X, fVector Y, fVector InvVar, ui sizex,
  637.                  void (*funcs)(fVector BasFuncs, float x, unsigned nfuncs));
  638. void    MF_linfit( fVector A, iVector AStatus, unsigned npars,
  639.                fVector X, fVector Y, fPMatrix MZ, unsigned htZ, unsigned lenZ,
  640.                void (*funcs)(fVector BasFuncs, float x, float y,
  641.                              unsigned nfuncs));
  642. void    MF_linfitwW( fVector A, fPMatrix Covar, iVector AStatus,
  643.                      unsigned npars,
  644.                      fVector X, fVector Y, fPMatrix MZ, fPMatrix MInvVar,
  645.                      unsigned htZ, unsigned lenZ,
  646.                      void (*funcs)(fVector BasFuncs, float x, float y,
  647.                                    unsigned nfuncs));
  648. int     MF_LUdecompose( fPMatrix MLU,  uiVector Ind, fPMatrix MA,
  649.                             unsigned len );
  650. float   MF_LUdet( fPMatrix MLU, unsigned len, int permut );
  651. float   MF_LUDgetEdit( void );
  652. void    MF_LUDsetEdit( float Thresh );
  653.      /*  Editing threshold for MF_LUdecompose; used to cure singularities */
  654. int     MF_LUDresult( void ); /* returns 0, if MF_LUdecompose was successful;
  655.                   returns 1, if MA was (nearly) singular in MF_LUdecompose. */
  656. void    MF_LUinv( fPMatrix MInv, fPMatrix MLU, uiVector Ind,
  657.                       unsigned len );
  658. void    MF_LUsolve( fVector X, fPMatrix MLU, fVector B, uiVector Ind,
  659.                         unsigned len );
  660. void    MF_LUimprove( fVector X, fVector B, fPMatrix MA, fPMatrix MLU,
  661.                           uiVector Ind, unsigned len );
  662. fMatrix MF_matrix( unsigned ht, unsigned len );
  663. fMatrix MF_matrix0( unsigned ht, unsigned len );
  664. void    MF_mulM( fPMatrix MC, fPMatrix MA, fPMatrix MB,
  665.                     unsigned htA, unsigned lenA, unsigned lenB );
  666. void    VF_mulM( fVector Y, fVector X, fPMatrix MA,
  667.                     unsigned sizX, unsigned lenA );
  668. void    MF_mulV( fVector Y, fPMatrix MA, fVector X,
  669.                     unsigned htA, unsigned lenA );
  670. void    MF_multiLinfit( fVector A, iVector AStatus, unsigned npars,
  671.                 MF_EXPERIMENT *ListOfExperiments, unsigned nexperiments,
  672.                 void (*funcs)(fVector BasFuncs, float x, float y,
  673.                               unsigned nfuncs, unsigned iexperiment) );
  674. void    VF_multiLinfit( fVector A, iVector AStatus, unsigned npars,
  675.                 VF_EXPERIMENT *ListOfExperiments, unsigned nexperiments,
  676.                 void (*funcs)(fVector BasFuncs, float x,
  677.                               unsigned nfuncs, unsigned iexperiment) );
  678. void    MF_multiLinfitwW( fVector A, fPMatrix Covar,
  679.                 iVector AStatus, unsigned npars,
  680.                 MF_EXPERIMENT *ListOfExperiments, unsigned nexperiments,
  681.                 void (*funcs)(fVector BasFuncs, float x, float y,
  682.                               unsigned nfuncs, unsigned nexperiment) );
  683. void    VF_multiLinfitwW( fVector A, fPMatrix Covar,
  684.                 iVector AStatus, unsigned npars,
  685.                 VF_EXPERIMENT *ListOfExperiments, unsigned nexperiments,
  686.                 void (*funcs)(fVector BasFuncs, float x,
  687.                               unsigned nfuncs, unsigned nexperiment) );
  688. float   MF_multiNonlinfit( fVector A, iVector AStatus, unsigned npars,
  689.                MF_EXPERIMENT _VFAR *ListOfExperiments, unsigned nexperiments,
  690.                void (*modelfunc)(fMatrix MZModel, unsigned htZ, unsigned lenZ,
  691.                                  fVector X, fVector Y, unsigned iexperiment),
  692.                void (*derivatives)(fMatrix dZdAi, unsigned htZ, unsigned lenZ,
  693.                                    fVector X, fVector Y, unsigned ipar,
  694.                                    unsigned iexperiment) );
  695. float   VF_multiNonlinfit( fVector A, iVector AStatus, unsigned npars,
  696.                VF_EXPERIMENT _VFAR *ListOfExperiments, unsigned nexperiments,
  697.                void (*modelfunc)(fVector YModel, fVector XModel,
  698.                                  ui size, unsigned iexperiment),
  699.                void (*derivatives)(fVector dYdAi,fVector X, ui size,
  700.                                  unsigned ipar, unsigned iexperiment) );
  701.  
  702. void    VF_multiNonlinfit_autoDeriv( fVector dYdAi, fVector X, ui size,
  703.                                        unsigned iexperiment, unsigned ipar );
  704. void    MF_multiNonlinfit_autoDeriv(fMatrix dZdAi, unsigned htZ, unsigned lenZ,
  705.                                     fVector X, fVector Y,
  706.                                     unsigned ipar, unsigned iexperiment );
  707. void     MF_multiNonlinfit_getBestA( fVector ABest );
  708. void     VF_multiNonlinfit_getBestA( fVector ABest );
  709. float    MF_multiNonlinfit_getChi2( void );
  710. float    VF_multiNonlinfit_getChi2( void );
  711. int      MF_multiNonlinfit_getTestDir( void );
  712. int      VF_multiNonlinfit_getTestDir( void );
  713. unsigned MF_multiNonlinfit_getTestPar( void );
  714. unsigned VF_multiNonlinfit_getTestPar( void );
  715. unsigned MF_multiNonlinfit_getTestRun( void );
  716. unsigned VF_multiNonlinfit_getTestRun( void );
  717. void     MF_multiNonlinfit_stop( void );
  718. void     VF_multiNonlinfit_stop( void );
  719.  
  720. float   MF_multiNonlinfitwW( fVector A, fPMatrix Covar,
  721.                 iVector AStatus, unsigned npars,
  722.                 MF_EXPERIMENT  *ListOfExperiments, unsigned nexperiments,
  723.                 void (*modelfunc)(fMatrix MZModel, unsigned htZ, unsigned lenZ,
  724.                                   fVector X, fVector Y, unsigned iexperiment ),
  725.                 void (*derivatives)(fMatrix dZdAi, unsigned htZ, unsigned lenZ,
  726.                                     fVector X, fVector Y,
  727.                                     unsigned ipar, unsigned iexperiment) );
  728. float   VF_multiNonlinfitwW( fVector A, fPMatrix Covar,
  729.                 iVector AStatus, unsigned npars,
  730.                 VF_EXPERIMENT *ListOfExperiments, unsigned nexperiments,
  731.                 void (*modelfunc)(fVector YModel, fVector X, ui size,
  732.                                   unsigned iexperiment),
  733.                 void (*derivatives)(fVector dYdAi, fVector X, ui size,
  734.                                   unsigned ipar, unsigned iexperiment) );
  735. void    MF_multiNonlinfitwW_autoDeriv( fMatrix dZdAi,
  736.                                     unsigned htZ, unsigned lenZ,
  737.                                     fVector X, fVector Y,
  738.                                     unsigned ipar, unsigned iexperiment );
  739. void    VF_multiNonlinfitwW_autoDeriv( fVector dYdAi, fVector X, ui size,
  740.                                        unsigned iexperiment, unsigned ipar );
  741. void     MF_multiNonlinfitwW_getBestA( fVector ABest );
  742. void     VF_multiNonlinfitwW_getBestA( fVector ABest );
  743. float    MF_multiNonlinfitwW_getChi2( void );
  744. float    VF_multiNonlinfitwW_getChi2( void );
  745. int      MF_multiNonlinfitwW_getTestDir( void );
  746. int      VF_multiNonlinfitwW_getTestDir( void );
  747. unsigned MF_multiNonlinfitwW_getTestPar( void );
  748. unsigned VF_multiNonlinfitwW_getTestPar( void );
  749. unsigned MF_multiNonlinfitwW_getTestRun( void );
  750. unsigned VF_multiNonlinfitwW_getTestRun( void );
  751. void     MF_multiNonlinfitwW_stop( void );
  752. void     VF_multiNonlinfitwW_stop( void );
  753.  
  754.  
  755. void    M_nfree( unsigned n, ... );
  756. float   MF_nonlinfit( fVector A, iVector AStatus, unsigned npars,
  757.                     fVector X, fVector Y, fPMatrix MZ, unsigned htZ, unsigned lenZ,
  758.                     void (*modelfunc)(fMatrix MZModel, unsigned htZ, unsigned lenZ, fVector X, fVector Y ),
  759.                     void (*derivatives)(fMatrix dZdAi, unsigned htZ, unsigned lenZ, fVector X, fVector Y, unsigned ipar) );
  760.        /* returns figure-of-merit of best A. If you don't know the partial
  761.           derivatives with respect to A, call with derivatives=NULL */
  762. float   MF_nonlinfitwW( fVector A, fPMatrix Covar, iVector AStatus, unsigned npars,
  763.                     fVector X, fVector Y, fPMatrix MZ, fPMatrix MInvVar, unsigned htZ, unsigned lenZ,
  764.                     void (*modelfunc)(fMatrix MZModel, unsigned htZ, unsigned lenZ, fVector X, fVector Y ),
  765.                     void (*derivatives)(fMatrix dZdAi, unsigned htZ, unsigned lenZ, fVector X, fVector Y, unsigned ipar) );
  766. float   VF_nonlinfit( fVector A, iVector AStatus, unsigned npars,
  767.                       fVector X, fVector Y, ui sizex,
  768.                       void (*modelfunc)(fVector YModel, fVector XModel, ui size),
  769.                       void (*derivatives)(fVector dYdAi,fVector X, ui size, unsigned iPar) );
  770. float   VF_nonlinfitwW( fVector A, fPMatrix Covar, iVector AStatus, unsigned npars,
  771.                     fVector X, fVector Y, fVector InvVar, ui sizex,
  772.                     void (*modelfunc)(fVector YModel, fVector X, ui size),
  773.                     void (*derivatives)(fVector dYdAi, fVector X, ui size, unsigned i) );
  774. void    MF_outerprod( fMatrix MA, fVector X,  fVector Y,
  775.                       unsigned ht, unsigned len );
  776. void    MF_Parzen( fMatrix MA, unsigned ht, unsigned len );
  777. float * MF_Pelement( fMatrix X, unsigned ht, unsigned len,
  778.                      unsigned m, unsigned n );
  779. void    VF_polyfit( fVector A, unsigned deg, fVector X, fVector Y, ui sizex );
  780. void    VF_polyfitwW( fVector A, fPMatrix Covar, unsigned deg,
  781.                       fVector X, fVector Y, fVector InvVar, ui sizex );
  782. void    MF_read( fPMatrix X, unsigned ht, unsigned len, FILE  *stream );
  783. void    MF_recall( fMatrix MA, unsigned ht, unsigned len, FILE *stream);
  784. void    MF_Row_addC( fMatrix MA, unsigned ht, unsigned len,
  785.                          unsigned iRow, float C );
  786. void    MF_Row_addV( fMatrix MA, unsigned ht, unsigned len,
  787.                          unsigned iRow, fVector X );
  788. void    MF_Row_divC( fMatrix MA, unsigned ht, unsigned len,
  789.                          unsigned iRow, float C );
  790. void    MF_Row_divrC( fMatrix MA, unsigned ht, unsigned len,
  791.                          unsigned iRow, float C );
  792. void    MF_Row_divrV( fMatrix MA, unsigned ht, unsigned len,
  793.                          unsigned iRow, fVector X );
  794. void    MF_Row_divV( fMatrix MA, unsigned ht, unsigned len,
  795.                          unsigned iRow, fVector X );
  796. void    MF_Row_equC( fMatrix MA, unsigned ht, unsigned len,
  797.                      unsigned iRow, float C );
  798. void    MF_Row_equV( fMatrix MA, unsigned ht, unsigned len,
  799.                      unsigned iRow, fVector X );
  800. void    MF_Row_extract( fVector Y, fMatrix MA, unsigned ht, unsigned len,
  801.                         unsigned iRow );
  802. void    MF_Row_mulC( fMatrix MA, unsigned ht, unsigned len,
  803.                          unsigned iRow, float C );
  804. void    MF_Row_mulV( fMatrix MA, unsigned ht, unsigned len,
  805.                          unsigned iRow, fVector X );
  806. void    MF_Row_subC( fMatrix MA, unsigned ht, unsigned len,
  807.                          unsigned iRow, float C );
  808. void    MF_Row_subrC( fMatrix MA, unsigned ht, unsigned len,
  809.                          unsigned iRow, float C );
  810. void    MF_Row_subrV( fMatrix MA, unsigned ht, unsigned len,
  811.                          unsigned iRow, fVector X );
  812. void    MF_Row_subV( fMatrix MA, unsigned ht, unsigned len,
  813.                          unsigned iRow, fVector X );
  814. void    MF_Rows_absmax( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  815. void    MF_Rows_absmin( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  816. void    MF_Rows_add( fPMatrix MA, unsigned ht, unsigned len,
  817.                      unsigned destRow, unsigned sourceRow );
  818. void    MF_Rows_Cadd( fPMatrix MA, unsigned ht, unsigned len,
  819.                       unsigned destRow, unsigned sourceRow, float C );
  820. void    MF_Rows_exchange( fPMatrix MA, unsigned ht, unsigned len,
  821.                          unsigned i1, unsigned i2 );
  822. void    MF_Rows_lincomb( fPMatrix MA, unsigned ht, unsigned len,
  823.                          unsigned destRow,  float  destC,
  824.                          unsigned srceRow,  float  srceC );
  825. void    MF_Rows_max( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  826. void    MF_Rows_min( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  827. void    MF_Rows_prod(fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  828. void    MF_Rows_reflect( fPMatrix MA, unsigned ht, unsigned len );
  829. void    MF_Rows_rotate( fPMatrix MA, unsigned ht, unsigned len, int pos );
  830. void    MF_Rows_runprod( fPMatrix MA, unsigned ht, unsigned len );
  831. void    MF_Rows_runsum( fPMatrix MA, unsigned ht, unsigned len );
  832. void    MF_Rows_sub( fPMatrix MA, unsigned ht, unsigned len,
  833.                      unsigned destRow, unsigned sourceRow );
  834. void    MF_Rows_sum( fVector Y, fPMatrix MA, unsigned ht, unsigned len );
  835. int     MF_safeSolve( fVector X, fPMatrix MA, fVector B, unsigned len );
  836.               /* ret.value 0: success via LUD; 1: success via SVD; -1: error */
  837.  
  838. void    M_setDensityMapBounds(  extended xmin, extended xmax,
  839.                                 extended ymin, extended ymax,
  840.                                 extended zmin, extended zmax,
  841.                                 COLORREF mincolor, COLORREF maxcolor );
  842. void    M_setDensityBounds(  extended zmin, extended zmax,
  843.                              COLORREF mincolor, COLORREF maxcolor );
  844.  
  845. void    VF_setLinfitNeglect( float Thresh );
  846.                 /* neglect A[i]=0, if significance smaller than Thresh */
  847. void    VF_setNonlinfitOptions( VF_NONLINFITOPTIONS *Options );
  848. void    MF_setWriteFormat( char *FormatString );
  849. void    MF_setWriteSeparate( char *SepString );
  850. int     MF_solve( fVector X, fPMatrix MA, fVector B, unsigned len );
  851. int     MF_solveBySVD( fVector X, fPMatrix MA, fVector B,
  852.                            unsigned htA, unsigned lenA );
  853.               /*  sizX = lenA,  sizB = htA.  ret.value != 0 signals failure */
  854. void    MF_spectrum( fPMatrix MSpec, unsigned htSpec, unsigned lenSpec,
  855.                      fPMatrix MX, unsigned htX, unsigned lenX,
  856.                      fPMatrix MWin );
  857.           /*   htSpec, lenSpec must be 2**n,
  858.                MSpec has [htSpec+1][lenSpec+1] elements (!)
  859.                htX >= n*htSpec,  lenX >= n*lenSpec,
  860.                htWin = 2*htSpec, lenWin = 2*lenSpec     */
  861.  
  862. void    MF_store( FILE *str, fMatrix MA, unsigned ht, unsigned len );
  863. void    MF_submatrix( fMatrix MSub,
  864.                       unsigned subHt,  unsigned subLen,
  865.                       fMatrix MSrce,
  866.                       unsigned srceHt,  unsigned srceLen,
  867.                       unsigned firstRowInCol,  unsigned sampInCol,
  868.                       unsigned firstColInRow,  unsigned sampInRow );
  869.  
  870. void    MF_submatrix_equM( fMatrix MDest,
  871.                            unsigned destHt,  unsigned destLen,
  872.                            unsigned firstRowInCol,  unsigned sampInCol,
  873.                            unsigned firstColInRow,  unsigned sampInRow,
  874.                            fMatrix MSrce,
  875.                            unsigned srceHt,  unsigned srceLen );
  876. int     MF_SVdecompose( fPMatrix MU, fPMatrix MV, fVector W, fPMatrix MA,
  877.                            unsigned htA, unsigned lenA );
  878. void    MF_SVDsetEdit( float Thresh );
  879. float   MF_SVDgetEdit( void ); /* Override of the standard values for editing
  880.                 threshholds in MF_SVsolve. Calling MF_setEdit with Thresh=0.0
  881.                 means that you do the necessary editing of W yourself before
  882.                 calling  MD_SVsolve                           */
  883. void    MF_SVimprove(  fVector X, fVector B, fPMatrix MA,
  884.                        fPMatrix MU, fPMatrix MV, fVector W,
  885.                        unsigned htA, unsigned lenA );
  886. void    MF_SVsolve( fVector X, fPMatrix MU, fPMatrix MV, fVector W,
  887.                        fVector B, unsigned htU, unsigned lenU );
  888. void    MF_transpose( fMatrix MTr, fPMatrix MA,
  889.                        unsigned htTr, unsigned lenTr );
  890. void    MF_UequL( fMatrix MA, unsigned len );
  891. void    MF_Welch( fMatrix MA, unsigned ht, unsigned len );
  892. void    MF_write( FILE  *stream, fPMatrix X, unsigned ht, unsigned len  );
  893. void    MF_xcorr( fPMatrix MXCorr, fPMatrix MX, fPMatrix MY,
  894.                      unsigned ht, unsigned len );
  895. void    MF_xyzAutoDensityMap( fVector X, fVector Y, fMatrix MZ,
  896.                               unsigned ht, unsigned len,
  897.                               COLORREF mincolor, COLORREF maxcolor );
  898. void    MF_xyzDataDensityMap( fVector X, fVector Y, fMatrix MZ,
  899.                               unsigned ht, unsigned len );
  900. void    MFzAutoDensityMap( fMatrix MZ, unsigned ht, unsigned len,
  901.                              COLORREF mincolor, COLORREF maxcolor );
  902. void    MFzDataDensityMap( fMatrix MZ, unsigned ht, unsigned len );
  903.  
  904.  
  905. ****************************************************************************
  906. *                                                                          *
  907. *******                      E  N  D                                 *******
  908. *                                                                          *
  909. ****************************************************************************
  910.  
  911. Copyright for OptiVec software and documentation
  912. (C) 1996-1999 Martin Sander.
  913. All rights reserved!
  914.